# import time
#
# from selenium import webdriver
# from selenium.webdriver.common.by import By
# from selenium.webdriver.edge.service import Service
# from webdriver_manager.microsoft import EdgeChromiumDriverManager
#
# #1.打开浏览器
# EdgeIns = EdgeChromiumDriverManager().install()
# driver = webdriver.Edge(service=Service(EdgeIns))
# time.sleep(2)
# #2.输入网址
# driver.get("https://www.csdn.net/?spm=1001.2014.3001.4476")
# time.sleep(2)
# #3.找到输入框，输入关键字
# driver.find_element(By.CSS_SELECTOR,"#toolbar-search-input").send_keys("徐霞客320")
# time.sleep(2)
# #4.点击按钮
# driver.find_element(By.CSS_SELECTOR,"#toolbar-search-button").click()
# time.sleep(2)
# #5.关闭浏览器
# driver.quit()

import time

from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.edge.service import Service
from webdriver_manager.microsoft import EdgeChromiumDriverManager

#1.打开浏览器
EdgeIns = EdgeChromiumDriverManager().install()
driver = webdriver.Edge(service=Service(EdgeIns))
time.sleep(2)
#2.输入网址
driver.get("https://www.baidu.com/")
time.sleep(2)
#3.找到输入框，输入关键字
driver.find_element(By.CSS_SELECTOR,"#kw").send_keys("徐霞客")
time.sleep(2)
#4.点击按钮
driver.find_element(By.CSS_SELECTOR,"#su").click()
time.sleep(2)
#5.关闭浏览器
driver.quit()

